package ma.mindware.mpm.domain.project;

import java.util.ArrayList;
import java.util.Properties;

import com.opensymphony.xwork2.ActionSupport;

import ma.mindware.met.core.technicalservice.DBService;
import ma.mindware.met.core.technicalservice.ServiceRunner;
import ma.mindware.met.core.technicalservice.TechnicalServiceException;
import ma.mindware.mpm.domain.tutorial.Quote;
import ma.mindware.mpm.technicalservice.db.QuoteDBService;
import ma.mindware.mpm.util.Connecter;

public class ProjectController extends ActionSupport {
	
	private Project projectInstance ;
	private ArrayList<Project> projectList ; 
	private int pages ;
	private ArrayList<Integer> beginPage ;
	private ArrayList<Boolean> checkedProjects ;
	private boolean checkedProject ;
	

	private Connecter connecter ;
	
	public ProjectController() {

		connecter = new Connecter();
	}
	
	/**
	 * Test
	 * @return
	 */
	
	public String test(){
//		Project p=new Project();
//		p.setName("TesT");
//		connecter.getDBServiceRunner();
//		DBService db=new DBService();
//		try {
//			db.create(p);
//		} catch (TechnicalServiceException e) {
//			e.printStackTrace();
//		}
//		System.out.println("END");
		return SUCCESS;	
	}

	
	//getters & setters 
	
	public Project getProjectInstance() {
		return projectInstance;
	}

	public void setProjectInstance(Project projectInstance) {
		this.projectInstance = projectInstance;
	}

	public ArrayList<Project> getProjectList() {
		return projectList;
	}

	public void setProjectList(ArrayList<Project> projectList) {
		this.projectList = projectList;
	}

	public int getPages() {
		return pages;
	}

	public void setPages(int pages) {
		this.pages = pages;
	}

	public ArrayList<Integer> getBeginPage() {
		return beginPage;
	}

	public void setBeginPage(ArrayList<Integer> beginPage) {
		this.beginPage = beginPage;
	}

	public ArrayList<Boolean> getCheckedProjects() {
		return checkedProjects;
	}

	public void setCheckedProjects(ArrayList<Boolean> checkedProjects) {
		this.checkedProjects = checkedProjects;
	}

	public boolean isCheckedProject() {
		return checkedProject;
	}

	public void setCheckedProject(boolean checkedProject) {
		this.checkedProject = checkedProject;
	}

	public Connecter getConnecter() {
		return connecter;
	}

	public void setConnecter(Connecter connecter) {
		this.connecter = connecter;
	}
	
}